package com.qzsoft.zhjd.collect.modules.dosage.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.jeemis.common.utils.Result;
import com.qzsoft.zhjd.collect.modules.dosage.dto.CollectDosageDto;
import com.qzsoft.zhjd.collect.modules.dosage.service.CollectDosageService;
import com.qzsoft.zhjd.common.utils.ResultUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 消耗信息
 */
@RestController
@RequestMapping("/collect/dosage")
public class CollectDosageController {

    @Autowired
    private CollectDosageService collectDosageService;

    /**
     * 分页
     *
     * @param params 查询条件
     * @return Result 分页列表
     */
    @GetMapping("page")
    public Result<IPage<CollectDosageDto>> page(@RequestParam Map<String, Object> params) {
        IPage<CollectDosageDto> page = collectDosageService.page(params);
        return ResultUtils.ok(page);
    }
}
